import Vue from 'vue'
// element官方提供 enLocale和zhLocale
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import menuZH from './zh'
import menuEN from './en'
// i18n全局注册(版本要9以下)
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
export default new VueI18n({
  locale: localStorage.getItem('lang') || '',
  messages: {
    en: {
      goodDay: 'have a good day',
      ...enLocale,
      ...menuEN
    },
    zh: {
      goodDay: '美好的一天',
      ...zhLocale,
      ...menuZH
    }
  }
})
